import request from "@/utils/rquest";
// 获取任务
export function getTaskdetail(data) {
  console.log(data);
  
  return request({
    url:`/task/detail/${data}`,
    method: "get",
  });
}

// 恢复任务
export function taskResume(id) {
  return request({
    url:`/task/resume/${id}`,
    method: "post",
  });
}

// 暂停任务
export function taskPause(id) {
  return request({
    url:`/task/pause/${id}`,
    method: "post",
  });
}

// 删除任务
export function taskDelete(id) {
  return request({
    url:`/task/delete/${id}`,
    method: "post",
  });
}

// 结束任务
export function taskEnd(id) {
  return request({
    url:`/task/end/${id}`,
    method: "post",
  });
}

// 创建任务
export function taskCreate(data) {
  return request({
    url: "/task/create",
    method: "post",
    data,
  });
}

// 手动执行任务
export function taskExecute(id) {
  return request({
    url:`/task/execute/${id}`,
    method: "post",
  });
}

// 更新任务
export function taskUpdate(data) {
  return request({
    url: "/task/modify",
    method: "post",
    data,
  });
}